package com.kaiwukj.android.ufamily.mvp.http.entity.result;

import com.blankj.utilcode.util.TimeUtils;
import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseBean;

public class UserResult extends BaseBean {
    /**
     * "age": 0,
     * "alias": "",
     * "backImg": "",
     * "birthday": "",
     * "concernNum": 0,
     * "faceCollectionImg": "",
     * "fansNum": 0,
     * "gender": 0,
     * "headImg": "",
     * "hkeeperId": 0,
     * "hobby": "",
     * "hxName": "",
     * "id": 0,
     * "industry": "",
     * payMemberStatus 0:非会员 1：会员
     * "lastCommunityId": 0,
     * "lastCommunityName": "",
     * "lifeState": "",
     * "nickName": "",
     * "ownerId": 0,
     * "phone": "",
     * "praiseNum": 0,
     * "region": "",
     * "signature":
     * payMemberExpiredTime
     */

    private Integer id;
    private Integer hkeeperId;//管家Id
    private String phone;
    private String hxName;
    private Integer ownerId;
    private Integer lastCommunityId;
    private String lastCommunityName;
    private Integer payMemberStatus;// 0:非会员 1：会员
    private String headImg;
    private String backImg;
    private String nickName;
    private String birthday;
    private Integer communityOwnerStatus;
    private Integer age;
    private Integer gender;
    private String faceCollectionImg;
    private String signature;
    private String industry;
    private String region;
    private String lifeState;
    private String hobby;
    private String alias;

    private Integer concernNum;
    private Integer fansNum;
    private Integer praiseNum;
    private Integer concernStatus;//是否关注0->否

    private String keeperHxName;
    private String keeperPhone;
    private String payMemberExpiredTime;


    public Integer getId() {
        return id == null ? 0 : id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getHkeeperId() {
        return hkeeperId == null ? -1 : hkeeperId;
    }

    public void setHkeeperId(Integer hkeeperId) {
        this.hkeeperId = hkeeperId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getHxName() {
        return hxName;
    }

    public void setHxName(String hxName) {
        this.hxName = hxName;
    }

    public Integer getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Integer ownerId) {
        this.ownerId = ownerId;
    }

    public Integer getLastCommunityId() {
        return lastCommunityId == null ? -1 : lastCommunityId;
    }

    public void setLastCommunityId(Integer lastCommunityId) {
        this.lastCommunityId = lastCommunityId;
    }

    public String getLastCommunityName() {
        return lastCommunityName == null || lastCommunityName.trim().length() == 0 ? "未知" : lastCommunityName;
    }

    public void setLastCommunityName(String lastCommunityName) {
        this.lastCommunityName = lastCommunityName;
    }

    public Integer getPayMemberStatus() {
        return payMemberStatus == null ? 0 : payMemberStatus;
    }

    public void setPayMemberStatus(Integer payMemberStatus) {
        this.payMemberStatus = payMemberStatus;
    }

    public boolean isVip() {
        return getPayMemberStatus() == 1;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public String getBackImg() {
        return backImg;
    }

    public void setBackImg(String backImg) {
        this.backImg = backImg;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public Integer getCommunityOwnerStatus() {
        return communityOwnerStatus == null ? 0 : communityOwnerStatus;
    }

    public void setCommunityOwnerStatus(Integer communityOwnerStatus) {
        this.communityOwnerStatus = communityOwnerStatus;
    }

    //是否是所选小区业主(是否在该小区有记录)
    public boolean isCommunityOwner() {
        return getCommunityOwnerStatus() == 1;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getGender() {
        return gender == null ? 2 : gender;
    }

    public String getGenderStr() {
        return getGender() == 1 ? "男" : "女";
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getFaceCollectionImg() {
        return faceCollectionImg;
    }

    public void setFaceCollectionImg(String faceCollectionImg) {
        this.faceCollectionImg = faceCollectionImg;
    }

    public boolean hasFace() {
        return faceCollectionImg != null && faceCollectionImg.trim().length() > 0;
    }

    public String getSignature() {
        return signature == null || signature.trim().length() <= 0 ? "这个人很懒，什么都没说" : signature;
    }

    public String getTrueSignature() {
        return signature == null ? "" : signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getIndustry() {
        return industry == null || industry.trim().length() == 0 ? "未知" : industry;
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    public String getRegion() {
        return region == null || region.trim().length() == 0 ? "未知" : region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getLifeState() {
        return lifeState;
    }

    public void setLifeState(String lifeState) {
        this.lifeState = lifeState;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public Integer getConcernNum() {
        return concernNum == null ? 0 : concernNum;
    }

    public void setConcernNum(Integer concernNum) {
        this.concernNum = concernNum;
    }

    public Integer getFansNum() {
        return fansNum == null ? 0 : fansNum;
    }

    public void setFansNum(Integer fansNum) {
        this.fansNum = fansNum;
    }

    public Integer getPraiseNum() {
        return praiseNum == null ? 0 : praiseNum;
    }

    public void setPraiseNum(Integer praiseNum) {
        this.praiseNum = praiseNum;
    }

    public Integer getConcernStatus() {
        return concernStatus == null ? 0 : concernStatus;
    }

    public void setConcernStatus(Integer concernStatus) {
        this.concernStatus = concernStatus;
    }

    public boolean isConcern() {
        return getConcernStatus() > 0;
    }

    public String getKeeperHxName() {
        return keeperHxName;
    }

    public void setKeeperHxName(String keeperHxName) {
        this.keeperHxName = keeperHxName;
    }

    public String getKeeperPhone() {
        return keeperPhone;
    }

    public void setKeeperPhone(String keeperPhone) {
        this.keeperPhone = keeperPhone;
    }

    public String getPayMemberExpiredTime() {
        return payMemberExpiredTime;
    }

    public void setPayMemberExpiredTime(String payMemberExpiredTime) {
        this.payMemberExpiredTime = payMemberExpiredTime;
    }

    public String getVipInvalidTime() {
        if (getPayMemberExpiredTime() == null) return "";
        long mills = TimeUtils.string2Millis(getPayMemberExpiredTime());
        return TimeUtils.millis2String(mills, "yyyy-MM-dd");
    }
}
